//
//  ViewController.m
//  GCD常用函数
//
//  Created by 李煜 on 2024/3/20.
//

#import "ViewController.h"
#import "XMTool.h"
@interface ViewController ()

@end

@implementation ViewController

-(void)viewDidLoad {
  [super viewDidLoad];
  
  XMTool *t0 = [[XMTool alloc]init];
//  [t0 release];
  XMTool *t1 = [[XMTool alloc]init];
//  [t1 release];

  XMTool *t2 = [XMTool new];
  XMTool *t3 = [t1 copy];
  XMTool *t4 = [t1 mutableCopy];
  XMTool *t5 = [XMTool shareTool];
  NSLog(@"t0:%p,t1:%p, t2:%p, t3:%p, t4:%p, t5:%p",t0,t1,t2,t3,t4,t5);

  NSLog(@"----retaincount:%lu---%lu",(unsigned long)t0.retainCount,(unsigned long)t1.retainCount);
  
#if __has_feature(objc_arc)
  NSLog(@"arc");
#else
  NSLog(@"mrc");
#endif
  
}


@end
